[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  RESTORE           Problem with change to higher level privates.

  Clipper Version  1.29 dtd 04/15/91.

  Problem Statement

  RESTSTORE FROM <xcMemFile> ADDITIVE may change the value(s) of higher
  level privates. An example:
       // Run this as a standalone program:
       Procedure MemSave
         Memvar  VarA
         Private VarA
         VarA := 'ABCDEF'
         Save to Test All Like VarA
       Return
      // Then run this:
      Procedure A
        Memvar  V1
        Private V1
        V1 = 1
        ? 'Procedure A, V1 Should be 1, V1=',V1    // => 1
        Do B
        ? 'Procedure A, V1 Should be 1, V1=',V1    // => 2
      Return
      ***********
      Procedure B
        Memvar  V1
        Private V1
        V1 = 2
        ? 'Procedure B, V1 Should be 2, V1=',V1    // => 2
        Do C
        ? 'Procedure B, V1 Should be 2, V1=',V1    // => 3
      Return
      ***********
      Procedure C
        MemVar  V1
        Private V1
        V1 = 3
        ? 'Procedure C, V1 Should be 3, V1=',V1    // => 3
        RESTORE FROM Test ADDITIVE
      Return

  Cause

  Unknown

  Work Around(s)

  Don't store variables in .MEM files.


This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson